<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@ include file="/common/pre/header.jsp" %>
    <script type="text/javascript" src="${ctx}/statics/js/common/n_nav.js"></script>
    <script src="${ctx}/statics/js/cart/cart.js"></script>
    <title>易买网</title>
</head>
<body>
<!--Begin Header Begin-->
<div id="searchBar">
    <%@ include file="/common/pre/searchBar.jsp" %>
</div>
<!--End Header End-->
<!--Begin Menu Begin-->
<div class="menu_bg">
    <div class="menu">
        <!--Begin 商品分类详情 Begin-->
        <%@ include file="/common/pre/categoryBar.jsp" %>
        <!--End 商品分类详情 End-->
    </div>
</div>
<!--End Menu End-->
<div class="i_bg">
    <!--Begin 筛选条件 Begin-->
    <!--End 筛选条件 End-->
    <div class="content mar_20">
        <div id="favoriteList">
        </div>
        <div class="l_list">
            <div class="list_t">
                <span class="fr">共发现${pageUtil.totalCount}件</span>
            </div>
            <div class="list_c">
                <ul class="cate_list">
                    <c:forEach items="${pageUtil.list}" var="temp">
                        <li>
                            <div class="img">
                                <a href="${ctx}/product?action=queryDeatil&id=${temp.id}" target="_blank">
                                    <img src="${ctx}/files/${temp.fileName}" width="210" height="185"/>
                                </a>
                            </div>
                            <div class="price">
                                <font>￥<span>${temp.price}</span></font>
                            </div>
                            <div class="name"><a href="#">${temp.name}</a></div>
                            <div class="carbg">
                                <a href="javascript:void(0);" class="ss">收藏</a>
                                <a href="javascript:void(0);" class="j_car" onclick="addCartByParam('${temp.id}',1);">加入购物车</a>
                            </div>
                        </li>
                    </c:forEach>
                </ul>
                <!-- 分页条 begin-->
                <div class="pages">
				    <c:if test="${pageUtil.totalPage>=1}">
				      <c:set var="url" value="product?action=queryList&categoryId=${param.categoryId}&categoryLevel=${param.categoryLevel}"></c:set>
				      <a href="${ctx}/${url }&currPageNo=1" class="p_pre">首页</a>
				        <c:if test="${pageUtil.currPageNo>1}">
				            <a href="${ctx}/${url}&currPageNo=${pageUtil.currPageNo-1}" class="p_pre">上一页</a>
				        </c:if>
				        <c:forEach  var="temp" begin="${pageUtil.currPageNo>3?pageUtil.currPageNo-3:1}" end="${pageUtil.totalPage-pageUtil.currPageNo>3?pageUtil.currPageNo+3:pageUtil.totalPage}" step="1">
				            <c:if test="${pageUtil.currPageNo==temp}">
				                <a href="${ctx}/${url}&currPageNo=${temp}" class="cur">${temp}</a>
				            </c:if>
				            <c:if test="${pageUtil.currPageNo!=temp}">
				                <a href="${ctx}/${url}&currPageNo=${temp}">${temp}</a>
				            </c:if>
				        </c:forEach>
				      <c:if test="${pageUtil.currPageNo<pageUtil.totalPage}">
				         <a href="${ctx}/${url}&currPageNo=${pageUtil.currPageNo+1}" class="p_pre">下一页</a>
				      </c:if>
				      <a href="${ctx}/${url}&currPageNo=${pageUtil.totalPage}" class="p_pre">尾页</a>
				    </c:if>
				    <c:if test="${pageUtil.totalPage==0}">
				        暂无记录
				    </c:if>
				</div>
				 <!-- 分页条 end-->
            </div>
        </div>
    </div>
    <%@ include file="/common/pre/footer.jsp" %>
</div>
</body>
</html>
